package com.ecar.core.common.dao;

import java.util.List;

import com.ecar.common.dao.mybatis.MybatisMapper;
import com.ecar.core.common.entity.Coupon;
import com.ecar.core.common.entity.CouponActivities;

public interface CouponMapper extends MybatisMapper{
    int deleteByPrimaryKey(String id);

    int insert(Coupon record);

    int insertSelective(Coupon record);

    Coupon selectByPrimaryKey(String id);
    
    Coupon selectByCouponActIdAndUserId(String couponId,String userId);

    int updateByPrimaryKeySelective(Coupon record);

    int updateByPrimaryKey(Coupon record);
    /**
     * 查询未使用优惠卷
     * @return
     */
    List<Coupon> selectNotUsedCoupon();
    
    List<CouponActivities> selectCouponByUserId(String passengerId);
    
    List<Coupon> selectByUserId(String passengerId);
    
    
}